﻿using Autofac;
using GC_VKMD.MusicDownloader.Abstractions.Interfaces.Factories.Managers;
using GC_VKMD.MusicDownloader.Abstractions.Interfaces.Helpers;
using GC_VKMD.MusicDownloader.Abstractions.Interfaces.Managers;
using GC_VKMD.MusicDownloader.Factories.Services;
using GC_VKMD.MusicDownloader.Helpers;
using GC_VKMD.MusicDownloader.Managers;

namespace GC_VKMD.MusicDownloader.Modules.Autofac
{
	public class MusicDownloaderModule : Module
	{
		#region Override Methods

		protected override void Load(ContainerBuilder builder)
		{
			base.Load(builder);

			builder.RegisterType<VKAudioFileManager>().As<IVKAudioFileManager>().SingleInstance();

			builder.RegisterType<VKServiceFactory>().As<IVKServiceFactory>().SingleInstance();

			//Dependencies: IVKServiceFactory, IVKAudioFileManager
			builder.RegisterType<VKMusicDownloader>().As<IVKMusicDownloader>().SingleInstance();
		}

		#endregion
	}
}
